Transcranial magnetic stimulation (TMS) can be used to alter the function of the cerebral cortex without surgery or direct application of electrical voltages. Magnetic fields may be generated by large current pulses in strong magnets arranged close to the head of a subject. Studies have indicated that TMS is useful both therapeutically and for research into brain function.